Add NixOS development setup support#1541
Conversation
… and added precombiled executables to enable debugging jest tests
Running test from VScode GUI not working yet. Therefor we must update the jest version to v29.
… makes the pah variables in the shell.nix file available for VSCode. Otherwiese VSCode is unable to run jest;npm or other commands.
|
Hi @Karl-Paul - thanks for taking the initiative on this. |
|
Hey @riccardoferretti — thanks for your response! |
riccardoferretti
left a comment
There was a problem hiding this comment.
This is looking good, can you tell me more about the eslint part?
| "eslint.enable": true, | ||
| "eslint.run": "onType", | ||
| "eslint.alwaysShowStatus": true, | ||
| "eslint.validate": [ | ||
| "javascript", | ||
| "javascriptreact", | ||
| "typescript", | ||
| "typescriptreact" | ||
| ], | ||
| "eslint.workingDirectories": [ | ||
| { | ||
| "directory": ".", | ||
| "changeProcessCWD": true | ||
| } | ||
| ] |
There was a problem hiding this comment.
are these settings about Nix?
There was a problem hiding this comment.
Good that you asked! I had some problems with ESLint. I was getting import errors that I couldn’t really interpret at first. I initially thought it was a Nix issue. But it turned out the problem was actually in the .eslintrc file, which I also fixed in the same commit. I checked again now and noticed that most of them are just default settings, so I’ll remove those changes.
Sorry for the confusion — my mistake!
|
|
||
| ### yarn test | ||
|
|
||
| Error: $DISPLAY not set / GUI-related errors on Windows or SSH |
There was a problem hiding this comment.
this is a good example of the type of issue I am worried might arise and I'd need to support ;)
There was a problem hiding this comment.
Yeah, I think I get what you mean. I have to admit, the setup is quite complex and can be a bit error-prone when it comes to special cases.
I honestly didn’t expect that I’d ever be able to run your setup with the VS Code extension for debugging. That’s quite a unique setup, but it actually works — and I think that’s pretty impressive!
So maybe that’s a good argument in favor of Nix ;).
replaced xvfb with xvfb-run
| ## References | ||
| - [Official Nix Website](https://nixos.org/) | ||
| - [NixOS configuration templates](https://nixos.wiki/wiki/Configuration_Collection) | ||
| - [my personal minimal NixOS config](https://github.com/Purschke/machines) No newline at end of file |
There was a problem hiding this comment.
this repo is not public, i can't access it
There was a problem hiding this comment.
sorry, I´ve made it public now
This PR introduces a minimal NixOS setup to make local development of Foam easier and fully reproducible. With this, contributors can start coding immediately in a clean enviroment — no manual installation or setup required.
shell.nix)direnvLet me know if you'd prefer this be documented.